package com.iven.xie.fboot.tools.result;

import org.springframework.http.HttpStatus;

/**
 * 自定义请求状态码
 *
 * @author iven.xie
 */
public enum ResultStatus {
    SUCCESS(HttpStatus.OK.value(), "成功"),
    SYS_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "系统错误");

    /**
     * 返回码
     */
    private Integer code;

    /**
     * 返回结果描述
     */
    private String msg;


    ResultStatus(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
